package com.ysh.logback;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 袁胜虎 on 2022/9/1 11:37
 */
public class TestMain {
    private static boolean enableDebug = false;

    private static Logger logger = LoggerFactory.getLogger(TestMain.class);
    public static  void main(String[] args){
        for (int i = 0; i < 10; i++) {
            logger.trace("程序运行到48行了");
            if (enableDebug){
                logger.debug("这是bag信息");
            }
            logger.info("这是输出的信息");
            try{
              int i1 = 1/0;
            }catch (Exception e){
                e.printStackTrace();
                logger.error("这是发生错误了");
            }
            logger.warn("发生灾难性故障了");
        }
    }

}
